{template Public:Page:header}
<div class="container">
  <div class="row"> 
  {template Member:Index:sidebar}
    <div class="col-lg-10 well-col-pl-30">
      <div class="row">
        <div class="well">
          <h3>邮箱验证</h3>
          <hr />
          
         	  <div data-target="#WiredWizardsteps" class="wizard wizard-wired" id="WiredWizard">
                        <ul class="steps">
                            <li class="active" data-target="#wiredstep1"><span class="step">1</span><span class="title">填写邮箱地址</span><span class="chevron"></span></li>
                            <li class="active" data-target="#wiredstep2"><span class="step">2</span><span class="title">验证邮箱码</span> <span class="chevron"></span></li>
                            <li data-target="#wiredstep3"><span class="step">3</span><span class="title">认证成功</span> <span class="chevron"></span></li>
                        </ul>
               </div>
                                                    

                <br />
                <br />
                 <div class="row">
             <div class="col-lg-offset-1 col-lg-10">
           	<form id="VerifyForm">
             	    <div class="col-lg-6">
                       <div class="row">
                         <div class="form-group has-feedback">
                           <div class="input-group">
   
                                 <span class="input-group-addon ">验证码</span><input type="text" name="code" value="" class="form-control" data-bv-notempty="true" data-bv-notempty-message="<i class='fa fa-frown-o'></i> 对不起,请输入激活码！" data-bv-regexp="true" data-bv-regexp-regexp="^[a-zA-Z0-9]+$" data-bv-regexp-message="<i class='fa fa-frown-o'></i> 对不起,请输入激活码格式有误！" data-bv-field="code"> 
                                 <div class="input-group-btn"><button class="btn btn-success shiny  control-label" type="submit">提交验证</button></div>
                          
       				 </div>
                          </div>
                          </div>
                          
                          <div class="row">
                      
                         <p>若长时间未收到，请点此<a href="javascript:void(0);" onclick="SubmitSendCode({echo $id});" class="label label-danger">重新发送</a></p>
                    
                         </div>
                     </div>
     
              
              <input name="Submit" type="hidden" value="true"/>
              <input name="id" type="hidden" value="{echo $id}"/>
              <input name="change" type="hidden" value="{echo $change}"/>
              </form>
             </div>
      </div>
                
                <div class="row">
                  <br />
                <br />
                <div class="col-lg-12">
                <h5>邮箱认证后享受的服务</h5>
                <hr />
                <p>
                <b>邮箱登录</b> 可直接使用“邮箱”登录<br>
                <b>重要事件提醒 </b>进行（支付/提现/选稿/中标）时，自动发送提醒<br>
                <b>找回账号密码</b> 忘记密码时，可使用邮箱短信找回密码。
                </p>
                </div>
                </div>


        </div>
      </div>
      
    </div>
  </div>
</div>



<script src="{echo AURL}/js/validation/bootstrapValidator.js"></script>

<script>
function SubmitSendCode(id){
	
	  $.post('{echo U("/post/email/sendcode/resend/1")}',$("#VerifyForm").serialize(), function(json) {
		
			$('.bootbox').PhpappProgress({json:json});

			return true;
		
	  }, 'json');
	  

	 bootbox.dialog({
		 message: '<div class="progress progress-striped active"><div style="width: 1%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="20" role="progressbar" class="progress-bar progress-bar-info"><span>0%</span></div></div>',
		 title: '<i class="icon fa fa-retweet"></i> 发送中',
		 closeButton: false
	 }).PhpappProgress({time:2000});
 
	  return false; 
	
}

 
$(document).ready(function () {

	  $('#VerifyForm').bootstrapValidator({
			excluded: [':disabled'],
			feedbackIcons: {
				valid: 'glyphicon glyphicon-ok',
				invalid: 'glyphicon glyphicon-remove',
				validating: 'glyphicon glyphicon-refresh'
			},
			submitHandler: function (form) {

			   $.post('{echo U("/post/email/verify")}',$("#VerifyForm").serialize(), function(json) {
	
					$('.bootbox').PhpappProgress({json:json});
		
					return true;
				
			  }, 'json');
			  
		
			 bootbox.dialog({
				 message: '<div class="progress progress-striped active"><div style="width: 1%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="20" role="progressbar" class="progress-bar progress-bar-info"><span>0%</span></div></div>',
				 title: '<i class="icon fa fa-retweet"></i> 验证中',
				 closeButton: false
			 }).PhpappProgress({time:2000});
		 
			  return false; 
			}
		
		}) 

	});
	   
</script>


{template Public:Page:footer}